package com.insight.dto.collection;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 失败表信息DTO
 * 用于记录采集失败的表详情
 *
 * @author Insight Team
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FailedTableInfo {

    /**
     * 表名
     */
    private String tableName;

    /**
     * Schema名称
     */
    private String schemaName;

    /**
     * 失败原因
     */
    private String errorMessage;

    /**
     * 重试次数
     */
    private Integer retryCount;

    /**
     * 失败时间
     */
    private String failedAt;

    /**
     * 构造简化版本(无重试信息)
     */
    public FailedTableInfo(String tableName, String schemaName, String errorMessage) {
        this.tableName = tableName;
        this.schemaName = schemaName;
        this.errorMessage = errorMessage;
        this.retryCount = 0;
        this.failedAt = java.time.LocalDateTime.now().toString();
    }
}
